#ifndef DAHENG_CAMERA_OBJ_H
#define DAHENG_CAMERA_OBJ_H

#include "../Base/RealtimeCamera.hpp"
#include "../inc/GxIAPI.h"
#include "Config.hpp"
#include <thread>

class DahengCamera : public RealtimeCamera
{
  private:
    friend class DahengDriver;
    std::string SN;
    DahengCamera(const std::string& sn);
    virtual ~DahengCamera();
    GX_DEV_HANDLE handle=nullptr;
    DahengConfig* config=nullptr;
    std::jthread ShotThread;
    char* imageData;
    long imageSize;
    GX_EVENT_CALLBACK_HANDLE hOffline;
  public:
    virtual std::string GetUUID() override final;
    virtual bool ShotStatus() override final;
    virtual BaseConfig* Config() override final;
    virtual void StartShot() override final;
    virtual void StopShot() override final;
    virtual ImgInf ShotImageType() override final;
    virtual long MaxSingleImgSize() override final;
    virtual float FPS() override final;
};

#endif
